package sk.vasicek.drinkmanager.domain;

import java.util.ArrayList;

public class Drinker {
	public enum Sex {
		man(0.68f), woman(0.72f);

		float alcoholMassConstant;

		private Sex(float alcoholMassConstant) {
			this.alcoholMassConstant = alcoholMassConstant;
		}

		public float getAlcoholMassConstant() {
			return this.alcoholMassConstant;
		}

		public void setAlcoholMassConstant(float alcoholMassConstant) {
			this.alcoholMassConstant = alcoholMassConstant;
		}

	}

	String name;
	Sex sex;
	private Float weight;
	ArrayList<Drink> drinks;

	public Drinker(String name, Sex sex, Float weight) {
		this.name = name;
		this.sex = sex;
		this.setWeight(weight);
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Sex getSex() {
		return this.sex;
	}

	public void setSex(Sex sex) {
		this.sex = sex;
	}

	public ArrayList<Drink> getDrinks() {
		return this.drinks;
	}

	public void setDrinks(ArrayList<Drink> drinks) {
		this.drinks = drinks;
	}

	public void addDrink(Drink drink) {
		if (this.drinks != null) {
			this.drinks.add(drink);
		} else {
			this.drinks = new ArrayList<Drink>();
		}
	}

	public void addDrinks(ArrayList<Drink> drinks) {
		if (this.drinks != null) {
			this.drinks.addAll(drinks);
		} else {
			this.drinks = drinks;
		}
	}

	public void setWeight(Float weight) {
		this.weight = weight;
	}

	public Float getWeight() {
		return weight;
	}

}
